TARGET=main
CC=gcc
SRC=$(wildcard *.c)
OBJS=$(patsubst %.c, %.o, $(SRC))

$(TARGET):$(OBJS)
	$(CC) $^ -o $@

%.o:%.c
	$(CC) -c $< -o $@

.PHONY:clean
clean:
	rm -rf $(TARGET) *.o